package lo23.model;
import java.util.Date;
import java.util.Random;
import java.util.UUID;


public abstract class User {

	protected String login;
	protected String pseudo;
	protected String firstName;
	protected String lastName;
	protected Date dateOfBrith;
	protected String avatar;
	private UUID  user;


	public User(String login){
		this.user = UUID.randomUUID();
		this.login = login;
		Random rand = new Random();
		int randomNumber = 00 + rand.nextInt(99 - 00);
		if (randomNumber < 10){
			this.login += "0" + randomNumber;

		}
		else {
			this.login += randomNumber;
		}
	}

	public String getLogin() {
		return login;
	}

	public String getPseudo() {
		return pseudo;
	}

	public void setPseudo(String pseudo) {
		this.pseudo = pseudo;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public Date getDateOfBrith() {
		return dateOfBrith;
	}

	public void setDateOfBrith(Date dateOfBrith) {
		this.dateOfBrith = dateOfBrith;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String toString() {
		return "User [login=" + login + ", pseudo=" + pseudo + ", firstName="
		+ firstName + ", lastName=" + lastName + ", dateOfBrith="
		+ dateOfBrith + ", avatar=" + avatar + "]";
	}

	public UUID getUser() {
		return user;
	}

}